home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 79 / XENIATGM79.iso / E-Mail / Paolo DeFelice / arc / textures.js < prev   
Text File  |  1999-08-13  |  2KB  |  73 lines

  1. function tile(Numero){
  2. if (!document.all)
  3. return;
  4. which=Numero;
  5. var source=event.srcElement;
  6. if (source.tagName=="IMG")
  7. document.body.style.backgroundImage="url("+photos[which]+")";
  8. alphaoff(Numero);
  9. window.status=photos[which];
  10. return true;}
  11.  
  12.  
  13. function alphaoff(Numero){
  14. test="im"+(Numero+1);
  15. provatimer=setInterval("prova(test)", 100);}
  16.  
  17. function prova(x){
  18. if(document[x].filters.alpha.opacity>50){
  19. document[x].filters.alpha.opacity -= 10;
  20. }
  21. else{clearInterval(provatimer);}
  22. }
  23.  
  24. var loadTimer;
  25. var Ava;
  26. var PreIm=new Array();
  27. function bm() {
  28.   Ava=0;
  29.   loadTimer=setInterval("ImgStart()",10);
  30.   return true;
  31. }
  32.  
  33. function ImgStart(){
  34.   if (Ava==0){
  35.      PreIm[Ava] = new Image();
  36.      PreIm[Ava].src=photos[Ava];
  37.   }
  38.  
  39.   if(Ava>NumPic){
  40.   clearInterval(loadTimer);
  41.   return;
  42.   }
  43.   
  44.   if (PreIm[Ava].complete){
  45.    loaded=Ava;
  46.    var j = Ava+1;
  47.    document.images["im"+j].src=PreIm[Ava].src
  48.      Ava++;
  49.      PreIm[Ava] = new Image();
  50.      PreIm[Ava].src=photos[Ava];
  51.   }
  52. }
  53.  
  54. //-->
  55.  
  56. <!--
  57. /*By George Chiang (WA JavaScript site www.abstract.simplenet.com)
  58. Credit must stay intact for use*/
  59. function tilew(numP){
  60. if(loaded<numP){return;}
  61. win2=window.open("","","width=700,height=500");
  62. if (win2){
  63. win2.focus();
  64. win2.document.open();
  65. win2.document.write("<head><title>"+photos[numP]+"</title></head>");
  66. win2.document.write("<body background="+'"'+PreIm[numP].src+'"'+">");
  67. win2.document.write("</body>");
  68. win2.document.close();
  69. }
  70. else
  71. alert("Failed in spawning a new window!");
  72. }
  73.